{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf390
{\fonttbl\f0\fnil\fcharset77 Monaco;\f1\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;\red96\green96\blue96;
}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs22 \cf2 // filtersAndDelaySynthdefs.rtf\cf0 \
\cf2 // Macintosh Compiled versions of these are in the folder called synthdefs\cf0 \
\cf2 // A bunch of Synthdefs from the supercollider docs, some modified, some my own...\cf0 \
\cf2 // Some of the below copyright (C) 2003 - 2006 Jonathan Saggau\cf0 \
\cf2 // License: GPL\cf0 \
\cf2 // Others from SC Docs\cf0 \
\cf2 // License: GPL\cf0 \
\cf2 // Still others from SC-users list\cf0 \
\cf2 // License: free\
//___________________________________________________________________________________________\cf0 \
\cf2 // Filters, etc that modify sound that's already playing.\cf0 \
\cf2 //___________________________________________________________________________________________\cf0 \
(\
\cf2 // apply a low pass filter to an audio source\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASLowPassFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 LPF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1)\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASHighPassFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 HPF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1)\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\
\cf2 // apply a low pass filter to an audio source\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASResonantLowPassFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1, resonance = 00.2;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 RLPF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1),\
			resonance\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASResonantHighPassFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1, resonance = 00.2;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 RHPF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1),\
			resonance\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASBandPassFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 BPF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1),\
			00.2\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASBandReductionFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 BRF\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1),\
			00.2\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASRingingFilter"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, freq = 300, freqDev = 50, boost = 1, ringTime = 00.2;\
	\cf3 ReplaceOut\cf0 .ar(\
		outBus,\
		\cf3 Ringz\cf0 .ar(\
			\cf3 In\cf0 .ar(inBus, 2),\
			\cf3 Lag\cf0 .kr(\cf3 LFNoise0\cf0 .kr(1, freqDev, freq), 1),\
			ringTime\
		)\
		*\
		boost \
		* \
		\cf3 LFPulse\cf0 .kr(1, [00.25, 0.75], [0.5, 0.45])\
		+\
		\cf3 In\cf0 .ar(inBus, 2)\
	)\
\}).writeDefFile;\
\
\
\cf2 //___________________________________________________________________________________________\cf0 \
\cf2 // Delays\cf0 \
\cf2 //___________________________________________________________________________________________
\f1 \cf0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural

\f0 \cf0 \
\cf2 // Simple Delays\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 SynthDef\cf0 (\cf4 "JASDelayNoInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
		\cf3 DelayN\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, z)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASDelayLinearInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
		\cf3 DelayL\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, z)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASDelayCubicInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 DelayC\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, z)\
			*\
			boost) \cf2 // putting z at beginning and end makes z the delayer and delayee\cf0 \
	)\
\}).writeDefFile;\
\
\cf2 // Combs\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASCombNoInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 CombN\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			*\
			boost)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASCombLinearInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 CombL\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			*\
			boost)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASCombCubicInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 CombC\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			* boost)\
	)\
\}).writeDefFile;\
\
\cf2 // Allpasss\cf0 \
\cf3 SynthDef\cf0 (\cf4 "JASAllpassNoInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 AllpassN\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			*\
			boost)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASAllpassLinearInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 AllpassL\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			*\
			boost)\
	)\
\}).writeDefFile;\
\
\cf3 SynthDef\cf0 (\cf4 "JASAllpassCubicInterpolation"\cf0 , \{ \cf3 arg\cf0  inBus = 0, outBus = 0, maxDelayTime = 0.1, currDelayTime = 0.1, multiplier = 1, addthis = 0.2, boost = 0.9;\
	z = \cf3 In\cf0 .ar(inBus, 2);\
	\cf3 Out\cf0 .ar(\
		outBus,\
			(\cf3 AllpassC\cf0 .ar(z, maxDelayTime, currDelayTime, multiplier, addthis)\
			* boost)\
	)\
\}).writeDefFile;\
)}